<?php
include("mysql_connect.php");
include("error/upload.php");

$xml = simplexml_load_file('php://input');

//$xml = simplexml_load_file('updateMyBoard.xml');

//XML Parse AccountInfo
foreach( $xml->attributes( ) as $attr)
{
	$AttrArray[] = $attr;
}
$UserName = $AttrArray[0];
$NewPassword = $AttrArray[1];

$strSqlCommand = "UPDATE user set Password='".$NewPassword."' WHERE Email='".$UserName."'";
							
if (!mysql_query($strSqlCommand)) {
	 echo '<Error Message="The requested Information was not found" Domain="Configuration" />';
	 error_log( "[".date("Y-m-d H:i:s")."] : Image not insert.(Social)\nMySQL : '".mysql_error()."'\n", 3,"ChangePassword-errors.log");
	 saveError("ChangePassword", $UserName, date("Y-m-d H:i:s"), mysql_error());
	 return;
}

echo '<Success Message="The requested Information was accepted" Domain="Configuration" />';
?>
